using System;

using System.Xml;

using System.Data;
using Aulac.Global.Enums; using Aulac.Global.Data; using Aulac.Global.Common; using Aulac.Global.Xml;
using System.Windows.Forms;
using Aulac.Client.Connect.Ems;
using System.Collections.Generic;
using Aulac.Verb.Ems;
using Aulac.Rsc.Bss.Tags;

namespace Aulac.Client.Data.Bss.Helper.DataItems
{
	/// <summary>
	/// Summary description for DataCommon.
	/// </summary>
    public class DataObjRdcHelper
	{

		public static void LoadObjReduced(ref Aulac.UtilityTools.AulacComboBox cb, int pIsActive)
		{

            XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument(AulacEmsVerb.Items.ObjRdc.GetListObjRdcd, AulacEmsVerb.Items.Noun.MdnItems.MdnItem);
            xmlDoc = DataRequest.ProcessRequest(xmlDoc);

			//cb.ClearDataContainer();
			XmlNodeList list = XmlProcess.GetListVchLineItem(xmlDoc);
			bool isReadOnly = cb.ReadOnly;
			if(!isReadOnly) cb.ReadOnly = true;
            cb.AddDataToControl(list);
			cb.ReadOnly = isReadOnly;
		}
			
		public static double GetObjRdcRate(string pPntPrkID, ref string HSPrntPrkID, ref string HspInNum)
		{
			
			XmlDataDocument xmlDoc = DataRequest.CreateXmlDocument("", AulacEmsVerb.Items.Noun.MdnItems.MdnItem);

			XmlElement eVoucher = XmlProcess.AddVchElm(ref xmlDoc);


			XmlDataDocument xDoc = DataRequest.ProcessRequest(xmlDoc);

			XmlElement eHeader = XmlProcess.GetVchHeaderElm(xDoc);
			
			if(eHeader == null)
				return 0;
			
			
//			return XmlProcess.GetValueDoubleAtrb(eHeader, tagItems.RdcObj.RdcObjRate);
            return 0;
		}

	}
}
